
import img404 from '@$@/img/img404.gif';
import $app from '@$@/js/$app';
import $router from '@/router'

let ListWarnInfo = {

  list(that) {

    let out = [
      {
        title: " ",
        type: "index",
        width: 30,
        align: "center ",
        className: "goOnTxt c999"
      },
      {
        type: "selection",
        className: "goOnTxt",
        align: "center",
        width: 40
      },
      {
        title: "图样",
        align: "center",
        width: 100,
        className: `f_14 goOnTxt padding5-0`,
        render: (h, params) => {
          let {
            row: {
              img_path
            }
          } = params;
          return h("div", [
            h("img", {
              class: `f_12 contain inlineBlock padding5 pointer`,
              style: {
                width: `80px`,
                height: `60px`,
              },
              attrs: {
                src: img_path
              },
              on: {
                error: (event) => {
                  event.target.src = img404;
                },
                click:(event)=>{
                  $app.imgBoxSee(event.target.src);
                }
              }
            })
          ]);
        }
      },
      // {
      //   title: "注册号",
      //   key: "register_number",
      //   className: "goOnTxt",
      //   width: 300,
      //   resizable: true,
      // },
      {
        title: "商标名称",
        key: "name",
        className: "goOnTxt",
        resizable: true,
      },
      {
        title: "注册号",
        key: "apply_number",
        className: "goOnTxt",
        resizable: true,
      },
      {
        title: "类别",
        key: "name22",
        className: "goOnTxt",
        resizable: true,
      },
      {
        title: "状态",
        key: "state_name",
        className: "goOnTxt",
        width: 100,
        resizable: true,
      },
      {
        title: "驳回时间",
        key: "reject_note_time",
        className: "goOnTxt",
        width: 150,
        resizable: true,
      },
      {
        title: "附件",
        className: "goOnTxt",
        render: (h, params) => {
          let {
            row: {
              reject_note_path
            }
          } = params;
          let out = [];
  
  
          out.push(
            h(
              "span",
              {
                class: "  cBlue textLink",
                on: {
                  click: () => {
                    $app.openWindow(reject_note_path);
                  }
                }
              },
              `驳回通知书`
            )
          );
  
          return out;
        }
      },
      {
        title: "操作",
        className: "goOnTxt",
        render: (h, params) => {
          let {
            row,
            row: {
              order_id
            }
          } = params;
          let out = [];
  
  
          out.push(
            h(
              "span",
              {
                class: "  cBlue textLink",
                on: {
                  click: () => {
                    // 页面跳转
                    $router.push({
                      name:'tmDetails',
                      query: {order_id}
                    });
                  }
                }
              },
              `查看详情`
            ),
            // h(
            //   "span",
            //   {
            //     class: "  cCCC marginR10",
            //   },
            //   `|`
            // ),
            // h(
            //   "span",
            //   {
            //     class: "  c999 textLink",
            //     on: {
            //       click: () => {
            //         that.huLA(row);
            //       }
            //     }
            //   },
            //   `忽略`
            // ),
          );
  
          return out;
        }
      }
    ];


    return out;
  }
}

// 表格 列 配置
export default ListWarnInfo;